/*******************************************************************************
* Copyright (c) 2010, 2018 西安秦晔信息科技有限公司
* Licensed under the Apache License, Version 2.0 (the "License");
*    you may not use this file except in compliance with the License.
*    You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
*    Unless required by applicable law or agreed to in writing, software
*    distributed under the License is distributed on an "AS IS" BASIS,
*    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*    See the License for the specific language governing permissions and
*    limitations under the License.
*******************************************************************************/
package com.qinyeit.serviceapp.entity;

import com.qinyeit.serviceapp.entity.system.ManagementAccount;
import com.qinyetech.springstage.core.entity.AbstractEntity;

import javax.persistence.*;
import javax.validation.constraints.NotEmpty;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Builder;
import lombok.experimental.Tolerate;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * ClassName: MerchantGroup <br/>
 * Function: 连锁店 <br/>
 * date: 2018-11-20 11:05:18 <br/>
 *
 * @author liuwenjin
 * @version  1.0
 * @since JDK 1.8
 */
@Builder
@Entity
@Table(name="merchant_groups")
public class MerchantGroup extends AbstractEntity {

	private static final long serialVersionUID = 1L;

	// 公司名 
    @Column(name="company_name", length = 300)
	private String companyName = null;

	// 联系人 
    @Column(name="linker", length = 300)
	private String linker = null;

	// 手机号 
    @Column(name="phone", length = 300)
	private String phone = null;

	// 电话 
    @Column(name="telephone", length = 300)
	private String telephone = null;

	// 地址 
    @Column(name="address", length = 300)
	private String address = null;


	@ManyToOne
	@JoinColumn(name="account_id")
	private ManagementAccount account;


    @Tolerate
	public MerchantGroup() {
		
	}
    @Tolerate
	public MerchantGroup(Long id){
    	super.setId(id);
    }
	
	/**
	 * 获取公司名
	 */
	public String getCompanyName() {
		return this.companyName;
	}

    /**
     * 设置公司名
     */
	public MerchantGroup setCompanyName(String companyName) {
		this.companyName = companyName;
		return this;
	}

	/**
	 * 获取联系人
	 */
	public String getLinker() {
		return this.linker;
	}

    /**
     * 设置联系人
     */
	public MerchantGroup setLinker(String linker) {
		this.linker = linker;
		return this;
	}

	/**
	 * 获取手机号
	 */
	public String getPhone() {
		return this.phone;
	}

    /**
     * 设置手机号
     */
	public MerchantGroup setPhone(String phone) {
		this.phone = phone;
		return this;
	}

	/**
	 * 获取电话
	 */
	public String getTelephone() {
		return this.telephone;
	}

    /**
     * 设置电话
     */
	public MerchantGroup setTelephone(String telephone) {
		this.telephone = telephone;
		return this;
	}

	/**
	 * 获取地址
	 */
	public String getAddress() {
		return this.address;
	}

    /**
     * 设置地址
     */
	public MerchantGroup setAddress(String address) {
		this.address = address;
		return this;
	}

	public ManagementAccount getAccount() {
		return account;
	}

	public void setAccount(ManagementAccount account) {
		this.account = account;
	}
}
